package javanio.buffer;

import java.nio.CharBuffer;

/**
 * Created by IntelliJ IDEA.
 * User: liuliwei
 * Date: 2017-09-18
 * Time: 下午1:13
 * Description: ${description}
 */
public class CharBufferTest {
    public static void main(String[] args) {
        CharBuffer charBuffer = CharBuffer.allocate(100);
        charBuffer.put('刘').put('利').put('伟');
        System.out.println(charBuffer.position());
        System.out.println(charBuffer.limit());
        charBuffer.clear();
        System.out.println(charBuffer.position());
        System.out.println(charBuffer.limit());
    }
}
